<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
      <title>My Facebook Login Page</title>
    </head>
    <body>
		<div id="fb-root"></div>
		<script src="http://connect.facebook.net/en_US/all.js"></script>
		<script>
			FB.init({ 
			   appId:'209476492413696', cookie:true, 
			   status:true, xfbml:true 
			});
			FB.Event.subscribe('auth.sessionChange', function(response) {
			    if (response.session) 
			    {	alert("Login!!!");
			        // 로그인 상태로 판정될 때 실행되는 코드
			    } else {
				    alert("Logout!!!");
			        // 로그아웃 상태로 판정될 때 실행되는 코드
			    }
			  });
		</script>
		<!--
		<fb:login-button perms="email,user_checkins">Login with Facebook</fb:login-button>
		<fb:login-button perms="email,user_checkins">Login with Facebook</fb:login-button>
		<fb:registration
            fields="[{'name':'email'}
            	, {'name':'user_checkins'}
            	, {'name':'favorite_car', 'description':'What is your favorite car?', 'type':'text'}]"
            redirect-uri="http://local.cg.com:8080/index.do">
    	</fb:registration>
		-->
		<fb:registration
            fields="[{'name':'name'}
            	, {'name':'email'}
            	, {'name':'password'}]"
            redirect-uri="http://local.cg.com:8080/index2.html">
    	</fb:registration>
    </body>
 </html>
